# -*- coding: utf-8 -*-
# @Time        :2024/10/11 下午6:56
# @Author      :文刀水寿
# @File        : 07_继承.py
"""
 @Description :
 单继承 --
 class 类名(要继承的类名)

 多继承 --
 class 类名(要继承的类名1，要继承的类名2·····)
"""


class Phone:
    IMEI = None
    producer = "ICAST"

    def call_by_5g(self):
        print("5g通话")


class NFCReader:
    nfc_type = "第五代"
    producer = "HM"

    def read_card(self):
        print("读取NFC卡")

    def write_card(self):
        print("写入NFC卡")


class RemoteControl:
    rc_type = "红外遥控"

    def control(self):
        print("红外遥控开启")


class MyPhone(Phone, NFCReader, RemoteControl):
    pass


# 多继承中，如果父类有同名方法或属性，先继承的优先级高于后继承
phone = MyPhone()
print(phone.producer)
